package com.kob.backend.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.PrimitiveIterator;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Bot {
    //与数据库的变量名称一一对应
    @TableId(type = IdType.AUTO) // 让主键自增
    private Integer id;
    private Integer userId; // 数据库中是user_id但到了这里要用userId命名
    private String title;
    private String description;
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") // 展示日期格式
    private Date createtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") // 展示日期格式
    private Date modifytime;
}
